﻿#parse("partials/header.html") #parse("partials/sidebar.html")
<script type="text/javascript">
    $(document).ready(function () {
        var oTable = $('#datalist').dataTable({
            "bSort": false,
            "sPaginationType": "full_numbers",
            "bProcessing": true,
            "bServerSide": true,

            "sAjaxSource": rooturl + "frontoffice/registration/tablelistregistration",
            "aoColumns": [
                            { "mDataProp": "Id" },
                            { "mDataProp": "RegNumber" },
            //{ "mDataProp": "RegDate" },
                            {"mDataProp": "PatientName" },
                            { "mDataProp": "DoctorName" },
                            { "mDataProp": "FullSpecialist" }
            //{"mDataProp": "Addresses.0.State" }

                        ],
            "aoColumnDefs": [
                                {
                                    "fnRender": function (o) {
                                        return "<center><img src='/images/Icons/table.png'/></center>";
                                    },
                                    "aTargets": [0]
                                }
                        ],
            "fnServerData": function (sSource, aoData, fnCallback) {
                aoData.push({ "name": "regno", "value": $('#TextboxRegNo').val() });
                aoData.push({ "name": "patientname", "value": $('#TextboxPatientName').val() });
                aoData.push({ "name": "doctorname", "value": $('#TextBoxDoctorName').val() });
                aoData.push({ "name": "regdate", "value": $('#TextboxRegDate').val() });
                jQuery.ajax({
                    "dataType": 'json',
                    "type": "GET",
                    "url": rooturl + "frontoffice/registration/tablelistregistration",
                    "data": aoData,
                    "success": fnCallback
                });
            }
        });

        function checkForEnter(event) {
            if (event.keyCode == 13) {
                oTable.fnDraw();
            }
        }

        $('#TextboxRegNo').keypress(checkForEnter);
        $('#TextboxPatientName').keypress(checkForEnter);
        $('#TextBoxDoctorName').keypress(checkForEnter);
        $('#TextboxRegDate').keypress(checkForEnter);
        $('#buttonSearch').click(function () { oTable.fnDraw(); });
    });

</script>
<!--mws-container Start-->
<style>
    div#datalist_filter
    {
        display: none;
    }
    div#datalist_length
    {
        display: none;
    }
    .mws-table thead
    {
        margin-top: -10px;
    }
</style>
<div id="mws-container" class="clearfix">
    <!-- Inner Container Start -->
    <div class="container">
        <!-- Panels Start -->
        <div class="mws-panel grid_8">
            <div class="title-caption">
                <h5>SHLV - OPD - Physician</h5>
            </div>
            <div class="mws-panel-header">
                <span class="mws-i-24 i-table-1">Registration List :: ( LOB : $Lob )</span>
            </div>
            <div class="mws-panel-body">
                <div class="mws-panel-toolbar top clearfix">
                    <ul>
                        <li><a class="mws-ic-16 ic-accept" href="/patientdata/default" title="Accept">Search
                            Patient</a></li>
                        <li><a class="mws-ic-16 ic-accept" href="/frontoffice/registration/searchdoctor"
                            title="Accept">Doctor List</a></li>
                        <li><a class="mws-ic-16 ic-accept" href="/frontoffice/registration/searchappointment"
                            title="Accept">Appointment List </a></li>
                        <li><a class="mws-ic-16 ic-add" href="/patientdata/default/patientdetail" title="Add">
                            New Patient Data Registration</a></li>
                        <li><a class="mws-ic-16 ic-accept" href="/frontoffice/registration/registrationlist"
                            title="Accept">Registration List</a></li>
                    </ul>
                </div>
                <br />
                <div class="mws-form" action="#">
                    <div class="mws-form-inline">
                        <div class="mws-form-row">
                            <label>
                                Registration No.</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input id="TextboxRegNo" type="text" class="mws-textinput" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Patient Name</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input id="TextboxPatientName" type="text" class="mws-textinput" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Doctor Name</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input id="TextBoxDoctorName" type="text" class="mws-textinput" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br />
                    <div class="mws-button-row">
                        <input id="buttonSearch" type="submit" value="Search" class="mws-button red" />
                    </div>
                </div>
                <table cellpadding="0" cellspacing="0" border="0" class="mws-table" id="datalist"
                    width="80%">
                    <thead>
                        <tr>
                            <th style="width: 5px; text-align: center">
                            </th>
                            <th style="width: 150px; text-align: center">
                                Registration No
                            </th>
                            <!-- <th style="width: 100px; text-align: center">
                                Registration Date
                            </th>-->
                            <th style="text-align: center">
                                Patient Name
                            </th>
                            <th style="text-align: center">
                                Doctor Name
                            </th>
                            <th style="text-align: center">
                                Doctor Specialist
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td colspan="7" class="dataTables_empty">
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <!-- Panels End -->
    </div>
    <!-- Inner Container End -->
</div>
<!--mws-container End-->
#parse("partials/footer.html")